<div class="zui-pageContent">
    <div id="grid" data-toggle="grid"
        data-options="{
				rownumbers: true,
                checkbox: true,
				isScroll: false,
                frozen:false,
                columnWidth:120,
                columns: [{ label: '顾客', name: 'CustomerID', align: 'left',frozen:true },
                { label: '公司名', name: 'CompanyName' },
                { label: '联系人', name: 'ContactName' },
                { label: '地址', name: 'Address' },
                { label: '邮编', name: 'PostalCode' },
                { label: '城市', name: 'City' }],
				pageSize:30,
                dataUrl:'Public/static/zui/demo/grid/CustomersData.js',
				detail: { onShowDetail: f_showOrder },
                onError: function (a, b)
                {
                }

        }"
        >
    </div>
</div>
    <script src="Public/static/zui/demo/grid/AllOrdersData.js" type="text/javascript"></script>

    <script type="text/javascript">
       function f_getOrdersData(CustomerID)
        {
            var data = { Rows: [] };
            for (var i = 0; i < AllOrdersData.Rows.length; i++)
            {
                if (AllOrdersData.Rows[i].CustomerID == CustomerID)
                    data.Rows.push(AllOrdersData.Rows[i]);
            }
            return data;
        }
        //显示顾客订单
        function f_showOrder(row, detailPanel,callback)
        {
            var $grid = $('<div>');//document.createElement('div');
            $(detailPanel).append($grid);
            $grid.ligerGrid({
                columns:
                            [
                            { label: '订单序号', name: 'OrderID',type:'float' },
                            { label: '运费', name: 'Freight', width: 50,type:'float' },
                            { label: '收货人', name: 'ShipName' },
                            { label: '收货地址', name: 'ShipAddress' },
                            { label: '收货城市', name: 'ShipCity' },
                            { label: '收货国家', name: 'ShipCountry' }
                            ], isScroll: false, showToggleColBtn: false,
                data: f_getOrdersData(row.CustomerID) , showTitle: false
                 , onAfterShowData: callback,frozen:false, height: '100%'
            });
        }


    </script>
